/* eslint-disable */
import request from "@/util/request";

/** 此处后端没有提供注释 POST /user/answer/delete */
export async function deleteUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/user/answer/delete", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/answer/query/all */
export async function queryAll1(
  body: API.UserAnswerQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.ResultResultPageUserAnswerVo>("/user/answer/query/all", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/answer/query/one/${param0} */
export async function queryOneById1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryOneById1Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.ResultUserAnswerVo>(`/user/answer/query/one/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/answer/register */
export async function addUserAnswer(
  body: API.UserAnswerAddDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/user/answer/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/answer/update */
export async function update1(
  body: API.UserAnswerUpdateDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/user/answer/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
